<template>
  <div class="productList">
    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
      <el-tab-pane label="标准产品" name="first">
        <productStadard></productStadard>
      </el-tab-pane>
      <el-tab-pane label="自定义产品" name="second">
        <productCustom></productCustom>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script setup>
// defineOptions({ name: "product" });
import { ref, getCurrentInstance, onMounted } from "vue";
let { proxy } = getCurrentInstance();
import productStadard from "./component/productStadard.vue";
import productCustom from "./component/productCustom.vue";
const activeName = ref('first')

onMounted(() => {
  console.log(789,proxy._storage.SStorage.get("pageIndex"));
  
  if(proxy._storage.SStorage.get("pageIndex")){
    activeName.value = 'second'
    proxy._storage.SStorage.remove("pageIndex");
    proxy._storage.SStorage.remove("pageSize");
    console.log('clearPageIndex',proxy._storage.SStorage.get("pageIndex"));
  }
})


const handleClick = (tab, event) => {
  console.log(tab, event);
  console.log(777,activeName.value)
};
</script>
<style lang="scss">
.productList {
  height: calc(100vh - 88px);
  background-color: white;
  box-sizing: border-box;
  padding: 24px;
  margin: 16px;
}
</style>
